<include file="Base/header" /> 	
<div class="page-container">
	<include file="Base/menu" /> 
	<div class="page-content">
		<div class="container-fluid">
			<div class="row-fluid">
					<div class="span12"> 
						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<h3 class="page-title">
						</h3>
						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="/index.php/Admin/">首页</a> 
								<i class="icon-angle-right"></i>
							</li>
							<li><a href="#">客户管理</a></li>
							<i class="icon-angle-right"></i>
							<li><a href="#">新增</a></li>
						</ul>
						<!-- END PAGE TITLE & BREADCRUMB-->
					</div>
			</div>
			<div class="row-fluid">
				<div class="span12"> 
					<div class="portlet box blue tabbable">
						<div class="portlet-title">
							<div class="caption">
								<i class="icon-reorder"></i>
									<span class="hidden-480">新增</span>
							</div>
						</div>
					<div class="portlet-body form">
						<form  method="post" class="form-horizontal" id="formid">
                            <div class="control-group">
                                
                            </div>
							<div class="control-group">
                        		<label class="control-label">客户名称</label>
                                <div class="controls">
                                    <input name="shop_name" type="text" class="m-wrap large">
                                    <span class="help-inline">添加客户名称</span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">客户英文名称</label>
                                <div class="controls">
                                    <input name="en_name" type="text" class="m-wrap large">
                                    <span class="help-inline">添加客户英文名称</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">联系人1</label>
                                <div class="controls">
                                	<input name="contact1" type="text" class="m-wrap large">
                                    <span class="help-inline">添加联系人1</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">联系人1职务</label>
                                <div class="controls">
                                	<input name="job1" type="text" class="m-wrap large">
                                    <span class="help-inline">添加联系人1职务</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">联系人1电话</label>
                                <div class="controls">
                                	<input name="phone1" type="text" class="m-wrap large">
                                    <span class="help-inline">添加联系人1电话</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">联系人2</label>
                                <div class="controls">
                                	<input name="contact2" type="text" class="m-wrap large">
                                    <span class="help-inline">添加联系人2</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">联系人2职务</label>
                                <div class="controls">
                                	<input name="job2" type="text" class="m-wrap large">
                                    <span class="help-inline">添加联系人2职务</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">联系人2电话</label>
                                <div class="controls">
                                	<input name="phone2" type="text" class="m-wrap large">
                                    <span class="help-inline">添加联系人2电话</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">客户地址</label>
                                <div class="controls">
                                	<input name="addr" type="text" class="m-wrap large">
                                    <span class="help-inline">添加客户地址</span>
                                </div>
                            </div>
                            <div class="control-group">
                        		<label class="control-label">客户编号</label>
                                <div class="controls">
                                	<input name="shop_no" type="text" class="m-wrap large">
                                    <span class="help-inline">添加客户编号</span>
                                </div>
                            </div>
							<div class="form-actions">
								<div type="submit" id="submit" class="btn blue"><i class="icon-ok"></i>添加</div>
							</div>
						</form>
					</div>
					</div>
				</div>
			</div>
		</div>
	</div>

</div>
<include file="Base/footer" />
<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
<script type="text/javascript">

$("#submit").click(function(){
	
	var data=$('#formid').serialize();
   	$.ajax({
   		type:'POST',
   		dataType: "json",
        url: "{:U('Admin/Shop/add')}",
        data: data,
        success:  function(result){
        	if(result.status==1){
                layer.alert(result.info,function(){self.location="__MODULE__/Shop/index";});
            }else if(result.status==0){
                //失败
                layer.alert(result.info);
            }
        }
    });
});

</script>
